package com.bit.springiocdemo.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/prop")
public class PropertiesController {
    @Value("${my.key}")
    private String myKey;

    @Value("${my.key1}")
    private Integer myKey1;

    @Value("${my.key2}")
    private Boolean myKey2;
    @RequestMapping("/readValue")
    public String readValue() {
        System.out.println("myKey: " + myKey);
        System.out.println("myKey1: " + myKey1);
        System.out.println("myKey2: " + myKey2);
        return "myKey: " + myKey;
    }
}
